#ifndef __GLOBAL_DATA_H__
#define __GLOBAL_DATA_H__

#include "cocos2d.h"
#include "utility/platform/Tools.h"

USING_NS_CC;
using namespace std;

typedef enum {
	DECLARE = 0,
	FIGHTING,
	WAITTING,
	DEMO,
	RESULT,
	RANK,
	REFUSE,
	CONSUME
} FIGHTSTATE;

class GlobalData
{
public:
	string m_hitMonsterCardNumber="";
	int m_waittingRemainingTime = 60;
	int m_fightRemainingTime = 60;
	int m_demoRemainingTime = 30;
	int m_mushroomCount = 10;
	int m_randomSeed = 0;
	int m_weapon_level = 1;
	int m_monster_level = 1;
	int m_monster_appear = 2000;
	int m_senior_monster_percent = 0;
	int m_total_point = 0;
	int m_total_exp = 0;
	int m_ball_once_point = 0;
	int m_ball_once_exp = 0;
	int m_bubble_once_point = 0;
	int m_bubble_once_exp = 0;
	int m_total_medals = 0;
	int m_pathValue = 1;
	string m_fightIsFrom = "mushroom";
	string m_display = "";
	FIGHTSTATE m_fightState = FIGHTING;
	FIGHTSTATE m_bubbleState = REFUSE;
	string m_gradeArr[6];
	string m_noMushroomAlert = "";
public:
	static GlobalData* getInstance();
	void loadBaseData();
	void loadMuashroomImages();
	void loadPaoPaoImages();
	void loadingCallBack(cocos2d::Texture2D *texture);
	void setParkId(const char* parkId);
	string getParkId();

	void setTerminalId(const char* terminalId);
	string getTerminalId();

	void setMacId(const char* macId);
	string getMacId();

	string getICometUrl();

	void setICometSeq(int seq);
	int getICometSeq();

	string getServerApiSoltUrl();

	string getServerApiStartUrl();

	string getSoundPath();

	string getServerApiMineUrl();

	string getServerApiSellUrl();

	string getServerApiHideUrl();

	string csbFileName;

	string getIdentityPath();

	void setIdentity(const char* identity);
	string getIdentity();

	string getWebSocketUrl();

	void setComRevice(const char* data);
	string getComRevice();

private:
	void init();

private:
	string m_parkId;
	string m_terminalId;
	string m_macId;

	string m_icometUrl;
	int m_icometSeq;

	string m_serverApiStartUrl;
	string m_serverApiSoltUrl;
	string m_getServerApiMineUrl;
	string m_getServerApiSellUrl;
	string m_getServerApiHideUrl;
	string m_soundPath;

	string m_identityPath;
	string m_identity;

	string m_webSocketUrl;

	string m_comRevice;
};

#endif // __GLOBAL_DATA_H__